# -*- coding: utf-8 -*-

import os


def setup():
    here = os.path.dirname(__file__)
    cfg_file = os.path.join(here, 'config')
    with open(cfg_file) as f:
        for line in f:
            name, value = line.strip().split('=')
            os.environ.setdefault(name, value)


setup()

host = os.environ.get('VACATION_HOST')
port = os.environ.get('VACATION_PORT')

bind = "%s:%s" % (host, port)
workers = 4
worker_class = 'gevent'  # 或者用 sync
backlog = 2048
daemon = False  # 用 supervisor 监控必须设为 False
